﻿
@model PessMvc.Models.LogOnModel

@{
    ViewBag.Title = "Log On";
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>


@using (Html.BeginForm())
{
    <fieldset class="m-lgon">
        <h2>用户登录</h2>
        @*<div class="editor-label">
            @Html.LabelFor(m => m.UserName)用户名：
                    </div>*@

        <div class="u-user">
            @Html.TextBoxFor(m => m.UserName, new { @class = "u-it u-it-lgon", Value = "请输入用户名", onclick = "if (value==defaultValue) {value='';}", onblur = "if (!value) {value=defaultValue;}" })
            @Html.ValidationMessageFor(m => m.UserName)
        </div>

        @*<div class="editor-label">
            @Html.LabelFor(m => m.Password)密码：
                    </div>*@

        <div class="u-pwd">
            @Html.PasswordFor(m => m.Password, new { @class = "u-it u-it-lgon" })
            @Html.ValidationMessageFor(m => m.Password)
        </div>
        <div class="u-ck-lgon">
            @Html.CheckBoxFor(m => m.RememberMe)
            @*@Html.LabelFor(m => m.RememberMe)*@记住我的帐号？
        </div>
        <div class="">
            <input type="submit" value="登 录" class="u-btn u-btn-lgon" />
        </div>


        @if (ViewBag.ShowRegister != null && ViewBag.ShowRegister == true)
        {
        <div>
            请输入您的用户名及密码。 如果您还没有帐号，请 @Html.ActionLink("注册", "Register")。
        </div>
        }
    </fieldset>
        <div style="text-align:center;">@Html.ValidationSummary(true, "登录失败。密码或用户名错误，请重新登录。")</div>
       
}

@*<h2 style="width:500px"><a href="/help/untitled.html">评委登录系统步骤（Windows XP系统）</a></h2>*@
<div id="downloadie" style='text-align:center;line-height:2;'></div>
<div id="jswarning" style='text-align:center;'>
    <br /><br /><h1>JavaScript被禁用！请启用JavaScript，以便正常打分。</h1>
</div>
<script type="text/javascript">
        $("#jswarning").hide();

    function getInternetExplorerVersion()
    // Returns the version of Internet Explorer or a -1
    // (indicating the use of another browser).
    {
        var rv = -1; // Return value assumes failure.
        if (navigator.appName == 'Microsoft Internet Explorer') {
            var ua = navigator.userAgent;
            var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
            if (re.exec(ua) != null)
                rv = parseFloat(RegExp.$1);
        }
        return rv;
    }
    function checkVersion() {
        var msg = "You're not using Internet Explorer.";
        var ver = getInternetExplorerVersion();
        var expectedver = 10.0;

        if (ver > -1) {
            if (ver >= expectedver)
                msg = "You're using a recent copy of Internet Explorer."
            else {
                //alert("您的浏览器版本较低，建议使用IE8.0以上浏览器。");
                $('#downloadie').html("<p>您的浏览器版本较低，建议升级到最新版本的IE浏览器。<a href='http://windows.microsoft.com/zh-CN/internet-explorer/downloads/ie' target='blank'>点击此处查看并下载安装最新IE浏览器</a></p>"+
                    "<p>如果您使用Windows XP操作系统，请安装Chrome浏览器。<a href='http://www.google.cn/intl/zh-CN/chrome/' target='blank'>点击此处下载Chrome浏览器</a></p>");
            }
        }

    }
    checkVersion();

</script>